#ifndef YafridngInterface_H
#define YafridngInterface_H

#include <libglademm/xml.h>
#include <gtkmm.h>
#include <Controller.h>
#include <ClientThread.h>

#ifdef ENABLE_NLS
#  include <libintl.h>
#endif

#define GLADE_FILE "ui/yafridng.glade"

class ComboModelColumn : public Gtk::TreeModelColumnRecord
{
 public:
  ComboModelColumn()
  { add(m_col_text); add(m_col_number); }

  Gtk::TreeModelColumn<int> m_col_text;
  Gtk::TreeModelColumn<int> m_col_number;
};

class TreeModelColumn : public Gtk::TreeModelColumnRecord
{
 public:
  TreeModelColumn()
    {add(renderer); add(status); add(p2p); add(wu); }

  Gtk::TreeModelColumn<string> renderer;
  Gtk::TreeModelColumn<string> status;
  Gtk::TreeModelColumn<int> p2p;
  Gtk::TreeModelColumn<int> wu;
};

class YafridngInterface
{
 public:
  YafridngInterface(Ice::CommunicatorPtr& c);
  void radioButton_changed_cb();
  void launchButton_clicked_cb();
  void cancelButton_clicked_cb();
  Gtk::Window* getMainWindow();
  bool updateFunction(int sceneType);
  ~YafridngInterface();

 private:
  ComboModelColumn columns;
  TreeModelColumn treeColumns;
  Glib::RefPtr<Gnome::Glade::Xml> refXml;
  Ice::CommunicatorPtr communicator;
  Glib::RefPtr<Gtk::ListStore> m_refListModel;
  Glib::RefPtr<Gtk::ListStore> treeListModel;
  Controller *control;
  ClientThreadPtr client;
};

#endif
